$OpenBSD: patch-configure,v 1.18 2016/11/01 13:03:14 jsg Exp $
--- configure.orig	Tue Oct 11 08:50:16 2016
+++ configure	Tue Nov  1 19:50:55 2016
@@ -1973,22 +1973,6 @@ if test "$_use_cxx11" = "yes" ; then
 fi
 echo $_use_cxx11
 
-# By default, we add -pedantic to the CXXFLAGS to catch some potentially
-# non-portable constructs, like use of GNU extensions.
-# However, some platforms use GNU extensions in system header files, so
-# for these we must not use -pedantic.
-case $_host_os in
-android | androidsdl | gamecube | psp | tizen | wii | webos)
-	;;
-*)
-	# ICC does not support pedantic, while GCC and clang do.
-	if test "$have_icc" = no ; then
-		# We *do* want the 'long long' extension.
-		append_var CXXFLAGS "-pedantic -Wno-long-long"
-	fi
-	;;
-esac
-
 # If possible, we want to use -Wglobal-constructors
 # However, not all compilers support that, so check whether the active one does.
 echocheck "whether -Wglobal-constructors work"
@@ -3838,18 +3822,16 @@ if test "$_flac" = auto ; then
 int main(void) { return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */ }
 EOF
 	if test "$_vorbis" = yes ; then
-		cc_check $FLAC_CFLAGS $FLAC_LIBS $OGG_CFLAGS $OGG_LIBS \
-			-lFLAC -logg && _flac=yes
+		cc_check `pkg-config --cflags --libs flac ogg` && _flac=yes
 	else
-		cc_check $FLAC_CFLAGS $FLAC_LIBS \
-			-lFLAC && _flac=yes
+		cc_check `pkg-config --cflags --libs flac` && _flac=yes
 	fi
 fi
 if test "$_flac" = yes ; then
 	if test "$_vorbis" = yes ; then
-		append_var LIBS "$FLAC_LIBS $OGG_LIBS -lFLAC -logg"
+		append_var LIBS "`pkg-config --libs flac ogg`"
 	else
-		append_var LIBS "$FLAC_LIBS -lFLAC"
+		append_var LIBS "`pkg-config --libs flac`"
 	fi
 	append_var INCLUDES "$FLAC_CFLAGS"
 fi
